#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    bool isFlipedString(string s1, string s2)
    {
        int len1 = s1.size();
        int len2 = s2.size();

        if (len1 != len2) return false;
        if (len1 == 0 && len2 == 0) return true;

        for (int i = 0; i < len1; ++i)
        {
            bool ret = true;
            for (int j = 0; j < len2; ++j)
            {
                if (s1[(i + j) % len1] != s2[j])
                {
                    ret = false;
                    break;
                }
            }
            if (ret) return true;
        }

        return false;
    }
};